\documentclass{acm_proc_article-sp}

\usepackage{graphicx}
\usepackage{fixltx2e}

\begin{document}

\title{Detecting and Resolving Deadlock and Infinite Loop using AspectJ}

\numberofauthors{2}

\author{
\alignauthor
Xiaodong Gu\\
       \affaddr{The Hong Kong University of Science and Technology, China}\\
       \email{xguaa@ust.hk}
\alignauthor
Fuxiang Chen\\
       \affaddr{The Hong Kong University of Science and Technology, China}\\
       \email{fchenaa@ust.hk}
}


\maketitle
\begin{abstract}
Many programmers often make mistakes in developing softwares and some of the
errors are hard to find due to its dynamic and multi-threading nature.
In this paper, we dynamically discover and resolve two issues that are
frequently observed (deadlock and infinite loop) that programmers
make.
We used a variant of AspectJ, Aspect Benchmark Compiler and its extension to help us detect resources
locking and analyse the call graph for our approach. 

Deadlock is often caused by different threads trying to hold the same resources
which have been held by the other threads, having bijection feature. We used two
special pointcuts, lock() and unlock() to help us determine which resources are being held by the
threads. We then used a deadlock algorithm, derived from the Operating System
context, in detecting the deadlock. Our approach is able to accurately detect
the deadlock and display the message and its information to the user. 

Infinite loop is the set of
repeated execution of a code block where there is no exit out of that
block.
Infinite loop wasted many resources and time, and can be hard to locate due to
the dynamic nature of the program. Programmers also may not be able to
differentiate between an infinite loop and a deadlock if the system does not
halt. We locate a loop that most likely fall into the infinite loop category
using a variant of AspectJ, Aspect Benchmark Compiler and inform the user of
this suspicion and to allow the user to break the infinite loop.
We analysed the method calls made by the program using call graph analysis. If
a method call is detected to call a threshold number of times, then it will be
suspected as a infinite loop. We evaluate our approach by creating an infinite
program and the system is able to accurately display the infinite loop.
\end{abstract}

% A category with the (minimum) three required fields
%\category{H.4}{Information Systems Applications}{Miscellaneous}
%A category including the fourth, optional field follows...
%\category{D.2.8}{Software Engineering}{Metrics}[complexity measures,
% performance measures]

%\terms{Theory}

%\keywords{ACM proceedings, \LaTeX, text tagging} % NOT required for Proceedings


\input{intro}
\input{relate}
%\input{problem}
\input{approach}
\input{evaluate}
\input{threat}
%\input{discuss}
\input{conclude}


%ACKNOWLEDGMENTS are optional
%\section{Acknowledgments}
%We would like to express our sincere \ldots


\bibliographystyle{abbrv}
\bibliography{sigproc} 

\end{document}
